<template>
  <div>
    <h3>{{title}}</h3>
    <p><button @click="sendDataHandler">点击触发事件</button></p>
  </div>
</template>

<script>
    export default {
      name: "ChildComponent01",
      props: {
        title: {
          type: String,
          required: true
        }
      },
      methods: {
        sendDataHandler() {
          this.$emit("myEvent");
        }
      }
    }
</script>

<style scoped>

</style>
